﻿@{
	ViewBag.Title = "推荐我的好友";
}
@section Head
{
	<link href="@Url.Content("~/Content/member/Style.css")" rel="stylesheet" type="text/css" />
	<script language="javascript">
        function copyToClipboard(txt) {
            if (window.clipboardData) {
                window.clipboardData.clearData();
                window.clipboardData.setData("Text", txt);
                alert("复制成功");
            } else if (navigator.userAgent.indexOf("Opera") != -1) {
                window.location = txt;
            } else if (window.netscape) {
                try {
                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                } catch (e) {
                    alert("如果您正在使用FireFox！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'");
                }
               
                var clip = Components.classes['@string.Format("{0}", "@")mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
                if (!clip)
                    return;
                var trans = Components.classes['@string.Format("{0}", "@")mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
                if (!trans)
                    return;
                trans.addDataFlavor('text/unicode');
                var str = new Object();
                var len = new Object();
                var str = Components.classes["@string.Format("{0}", "@")mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
                var copytext = txt;
                str.data = copytext;
                trans.setTransferData("text/unicode", str, copytext.length * 2);
                var clipid = Components.interfaces.nsIClipboard;
                if (!clip)
                    return false;
                clip.setData(trans, null, clipid.kGlobalClipboard);
                alert("复制成功！")
            }
        } 
	</script>
}
<div id="content">
	@Html.Partial("_MymenuPartial")
	<fieldset class="right">
		<legend>推荐我的好友</legend>
		<p>
			推荐我的好友：每推荐一个好友访问，您就会获得1个积分，推荐好友注册为会员即可获得3个积分.<a href="#">什么是积分？</a></p>
		<dl>
			<dd class="big">
				<input name="CodeActive" type="text" value="@ViewBag.URL" id="CodeActive" onmouseover="this.select()" style="width:420px;" class="input1" />
				<input class="button1"
					id="Button1" type="button" value="复制" onclick="copyToClipboard(document.getElementById('CodeActive').value);" /></dd></dl>
		<dl>
			<dt>QQ,MSN格式：</dt><dd class="big"><input name="MSNURL" type="text" value="@ViewBag.URL,很好的一个网站，推荐给您，建议你也看一下。" id="MSNURL" onmouseover="this.select()" style="width:420px;" class="input1" />
			<input class="button1"
				type="button" name="button3" id="button4" value="复制" onclick="copyToClipboard(document.getElementById('MSNURL').value);" /></dd></dl>
		<dl>
			<dt>论坛签名格式:</dt>
			<dd class="big">
				<input name="BBSURL" type="text" value="[url=@ViewBag.URL]很好的一个网站，推荐给您，建议你也看一下[/url]" id="BBSURL" onmouseover="this.select()" style="width:420px;" class="input1" />
				<input class="button1" type="button" name="button" id="button2" value="复制" onclick="copyToClipboard(document.getElementById('BBSURL').value);" /></dd>
		</dl>
</fieldset>
</div>
